package com.baturu.vin.gm.dal.dao;

import com.baturu.vin.gm.dto.OptionFamilyDTO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Collection;
import java.util.List;

public interface OptionFamilyDAO {

    @Select("<script>SELECT fam_name famName,optionCode " +
            "FROM gm_option_family " +
            "WHERE optionCode in " +
            "<foreach item='item' index='index' collection='optionCodeList' open='(' separator=',' close=')'> " +
            "#{item} " +
            "</foreach>" +
            "</script>")
    List<OptionFamilyDTO> findOptionFamily(@Param("optionCodeList") Collection<String> optionCodeList);
}
